﻿Public Class CreateProiontaUserControl

    Private Sub ProiontaBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If (EnergoCheckBox.Checked) Then
            Me.ProiontaTableAdapter.InsertQuery(IdProiontaTextBox.Text, PerigrafiTextBox.Text, CheckState.Checked, Convert.ToInt32(FpaTextBox.Text), Convert.ToDecimal(Timi_xondrikisTextBox.Text), Convert.ToDecimal(Timi_lianikisTextBox.Text), MarkaTextBox.Text, Xora_proelefsisTextBox.Text, Im_kataxorisisDateTimePicker.Value.Date, Im_metavolisDateTimePicker.Value.Date, Id_etairiasTextBox.Text)
        Else
            Me.ProiontaTableAdapter.InsertQuery(IdProiontaTextBox.Text, PerigrafiTextBox.Text, CheckState.Unchecked, Convert.ToInt32(FpaTextBox.Text), Convert.ToDecimal(Timi_xondrikisTextBox.Text), Convert.ToDecimal(Timi_lianikisTextBox.Text), MarkaTextBox.Text, Xora_proelefsisTextBox.Text, Im_kataxorisisDateTimePicker.Value.Date, Im_metavolisDateTimePicker.Value.Date, Id_etairiasTextBox.Text)
        End If
    End Sub
End Class
